package com.davinci.freemarket.businessLayer.utils.writer;

import java.util.zip.*;
import java.io.*;

public class FreeMarketZipWriter extends FreeMarketAbstractWriter{
	
	public FreeMarketZipWriter(String charset){
		super(charset);
	}

	public void prepare() throws IOException {
		
		byteOutPut = new ByteArrayOutputStream(20000);
		GZIPOutputStream zip = new GZIPOutputStream(byteOutPut, 20000);
		OutputStreamWriter bridge = new OutputStreamWriter(zip, charset);
		
		bridge.write(out.toString());
		bridge.flush();
		bridge.close();
		
		size = byteOutPut.size();
	}
	
}
